package com.ailink.concurrent.thread;

/**
 * Created by Administrator on 2018/10/15
 */
public class ThreadLocalTest {
    private static ThreadLocal<Integer> threadLocal = new ThreadLocal();
    private static ThreadLocal<String> threadLocal1 = new ThreadLocal();

    public static void main(String[] args) {
        threadLocal.set(1);
        threadLocal1.set("123");

        System.out.println(threadLocal.get());
        System.out.println(threadLocal1.get());

        threadLocal.set(2);
        threadLocal.remove();
        threadLocal1.remove();

    }
}
